package com.xueyi.system.file.domain.po;

import java.util.Date;

import cn.hutool.json.JSONArray;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xueyi.common.core.web.tenant.base.TBaseEntity;
import com.xueyi.system.file.domain.dto.BaseFileDto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.xueyi.common.core.annotation.Excel;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * 文件管理 持久化对象
 *
 * @author yanhe
 */
@TableName(value = "base_file", excludeProperty = {"sort"}, autoResultMap = true)
public class BaseFilePo extends TBaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 文件名称
     */
    @Excel(name = "文件名称")
    @TableField(value = "file_name", condition = LIKE)
    private String name;

    /**
     * 文件编码
     */
    @Excel(name = "文件编码")
    @TableField(value = "file_code", condition = LIKE)
    private String fileCode;

    /**
     * 年份
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "年份", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("file_year")
    private Date fileYear;

    /**
     * 文件类型id
     */
    @Excel(name = "文件类型id")
    @TableField("file_type_id")
    private String fileTypeId;

    /**
     * 文件类型
     */
    @Excel(name = "文件类型")
    @TableField("file_type")
    private String fileType;

    /**
     * 份数
     */
    @Excel(name = "份数")
    @TableField("file_num")
    private Integer fileNum;

    /**
     * 份页数
     */
    @Excel(name = "份页数")
    @TableField("file_pages")
    private Integer filePages;

    /**
     * 存档日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "存档日期", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("filing_date")
    private Date filingDate;

    /**
     * 附件
     */
    @Excel(name = "附件")
    @TableField(value = "appendix", typeHandler = FastjsonTypeHandler.class)
    private JSONArray appendix;

    /**
     * 负责人id
     */
    @Excel(name = "负责人id")
    @TableField("file_leader_id")
    private String fileLeaderId;

    /**
     * 负责人
     */
    @Excel(name = "负责人")
    @TableField("file_leader")
    private String fileLeader;

    @Override
    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String getName() {
        return name;
    }

    public void setFileCode(String fileCode) {
        this.fileCode = fileCode;
    }

    public String getFileCode() {
        return fileCode;
    }

    public void setFileYear(Date fileYear) {
        this.fileYear = fileYear;
    }

    public Date getFileYear() {
        return fileYear;
    }

    public void setFileTypeId(String fileTypeId) {
        this.fileTypeId = fileTypeId;
    }

    public String getFileTypeId() {
        return fileTypeId;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    public String getFileType() {
        return fileType;
    }

    public void setFileNum(Integer fileNum) {
        this.fileNum = fileNum;
    }

    public Integer getFileNum() {
        return fileNum;
    }

    public void setFilePages(Integer filePages) {
        this.filePages = filePages;
    }

    public Integer getFilePages() {
        return filePages;
    }

    public void setFilingDate(Date filingDate) {
        this.filingDate = filingDate;
    }

    public Date getFilingDate() {
        return filingDate;
    }

    public void setAppendix(JSONArray appendix) {
        this.appendix = appendix;
    }

    public JSONArray getAppendix() {
        return appendix;
    }

    public void setFileLeaderId(String fileLeaderId) {
        this.fileLeaderId = fileLeaderId;
    }

    public String getFileLeaderId() {
        return fileLeaderId;
    }

    public void setFileLeader(String fileLeader) {
        this.fileLeader = fileLeader;
    }

    public String getFileLeader() {
        return fileLeader;
    }

}
